I am working with creating Ansible modules for pagerduty, one module per api endpoint. I have sorted out most of the issues I have seen and the module is currently usable but a little rough.
One issue I still can’t figure out is when adding a push_notification_contact_method
I am getting a 400 error
{
"error": {
"errors": [
"Device type can't be blank",
"Device type is not included in the list"
],
"code": 2001,
"message": "Invalid Input Provided"
}
}
I have tried this both with the module I wrote and also in the sandbox web api with the following data.
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/vnd.pagerduty+json;version=2' --
header 'Authorization: Token token=SUPER_SECRET' -d '{
"contact_method": {
"id": "string",
"summary": "string",
"type": "push_notification_contact_method",
"self": "string",
"html_url": "string",
"label": "work",
"address": "aaabbbccc"
}
}' 'https://api.pagerduty.com/users/POCXUJI/contact_methods'
I am not sure where to go from here, it seems like an internal error. All the other contact_methods work just fine.
Thanks!